<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditPersonnelTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_idpersonnel}" for="idpersonnel" />
                    <h:inputText id="idpersonnel" value="#{personnelController.selected.idpersonnel}" title="#{bundle.EditPersonnelTitle_idpersonnel}" required="true" requiredMessage="#{bundle.EditPersonnelRequiredMessage_idpersonnel}"/>
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_cnrps}" for="cnrps" />
                    <h:inputText id="cnrps" value="#{personnelController.selected.cnrps}" title="#{bundle.EditPersonnelTitle_cnrps}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_cin}" for="cin" />
                    <h:inputText id="cin" value="#{personnelController.selected.cin}" title="#{bundle.EditPersonnelTitle_cin}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_email}" for="email" />
                    <h:inputText id="email" value="#{personnelController.selected.email}" title="#{bundle.EditPersonnelTitle_email}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_specialite}" for="specialite" />
                    <h:inputText id="specialite" value="#{personnelController.selected.specialite}" title="#{bundle.EditPersonnelTitle_specialite}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_tel}" for="tel" />
                    <h:inputText id="tel" value="#{personnelController.selected.tel}" title="#{bundle.EditPersonnelTitle_tel}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_fax}" for="fax" />
                    <h:inputText id="fax" value="#{personnelController.selected.fax}" title="#{bundle.EditPersonnelTitle_fax}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_addresse}" for="addresse" />
                    <h:inputText id="addresse" value="#{personnelController.selected.addresse}" title="#{bundle.EditPersonnelTitle_addresse}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_codepostal}" for="codepostal" />
                    <h:inputText id="codepostal" value="#{personnelController.selected.codepostal}" title="#{bundle.EditPersonnelTitle_codepostal}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_ville}" for="ville" />
                    <h:inputText id="ville" value="#{personnelController.selected.ville}" title="#{bundle.EditPersonnelTitle_ville}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_dateUpd}" for="dateUpd" />
                    <h:inputText id="dateUpd" value="#{personnelController.selected.dateUpd}" title="#{bundle.EditPersonnelTitle_dateUpd}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_dateAdd}" for="dateAdd" />
                    <h:inputText id="dateAdd" value="#{personnelController.selected.dateAdd}" title="#{bundle.EditPersonnelTitle_dateAdd}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_active}" for="active" />
                    <h:inputText id="active" value="#{personnelController.selected.active}" title="#{bundle.EditPersonnelTitle_active}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_position}" for="position" />
                    <h:inputText id="position" value="#{personnelController.selected.position}" title="#{bundle.EditPersonnelTitle_position}" required="true" requiredMessage="#{bundle.EditPersonnelRequiredMessage_position}"/>
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_deleted}" for="deleted" />
                    <h:inputText id="deleted" value="#{personnelController.selected.deleted}" title="#{bundle.EditPersonnelTitle_deleted}" />
                    <h:outputLabel value="#{bundle.EditPersonnelLabel_gradeIdgrade}" for="gradeIdgrade" />
                    <h:selectOneMenu id="gradeIdgrade" value="#{personnelController.selected.gradeIdgrade}" title="#{bundle.EditPersonnelTitle_gradeIdgrade}" required="true" requiredMessage="#{bundle.EditPersonnelRequiredMessage_gradeIdgrade}">
                        <f:selectItems value="#{gradeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{personnelController.update}" value="#{bundle.EditPersonnelSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditPersonnelViewLink}"/>
                <br />
                <h:commandLink action="#{personnelController.prepareList}" value="#{bundle.EditPersonnelShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditPersonnelIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
